<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <body>

        <ui:composition template="./productionReport.xhtml">

            <ui:define name="tabContent">

                <p:panel header="Theo tháng">
                    <h:form>
                        <h:panelGrid columns="10">
                            Tháng
                            <p:selectOneMenu value="#{productionByShortCodeBean.month}">
                                <f:selectItem itemLabel="1" itemValue="1"/><f:selectItem itemLabel="2" itemValue="2"/>
                                <f:selectItem itemLabel="3" itemValue="3"/><f:selectItem itemLabel="4" itemValue="4"/>
                                <f:selectItem itemLabel="5" itemValue="5"/><f:selectItem itemLabel="6" itemValue="6"/>
                                <f:selectItem itemLabel="7" itemValue="7"/><f:selectItem itemLabel="8" itemValue="8"/>
                                <f:selectItem itemLabel="9" itemValue="9"/><f:selectItem itemLabel="10" itemValue="10"/>
                                <f:selectItem itemLabel="11" itemValue="11"/><f:selectItem itemLabel="12" itemValue="12"/>
                            </p:selectOneMenu>
                            Năm
                            <p:selectOneMenu value="#{productionByShortCodeBean.year}">
                                <f:selectItem itemLabel="2011" itemValue="2011"/>
                                <f:selectItem itemLabel="2012" itemValue="2012"/>
                                <f:selectItem itemLabel="2013" itemValue="2013"/>
                            </p:selectOneMenu>
                            <p:commandButton ajax="false" value="Xem báo cáo" action="#{productionByShortCodeBean.reportByMonth()}"/>
                            <p:commandButton ajax="false" value="Xem tháng này" action="#{productionByShortCodeBean.reportByThisMonth()}"/>
                        </h:panelGrid>
                    </h:form>
                    <br/>
                    <h:form>
                        <p:dataTable id="tblByMonth" value="#{productionByShortCodeBean.productionMonths}" var="monthItem">

                            <p:column headerText="Mạng" sortBy="#{monthItem.opertator}">
                                #{monthItem.opertator}
                            </p:column>
                            <p:column headerText="6071" sortBy="#{monthItem.p6071}">
                                #{monthItem.p6071}
                            </p:column>
                            <p:column headerText="6171" sortBy="#{monthItem.p6171}">
                                #{monthItem.p6171}
                            </p:column>
                            <p:column headerText="6271" sortBy="#{monthItem.p6271}">
                                #{monthItem.p6271}
                            </p:column>
                            <p:column headerText="6371" sortBy="#{monthItem.p6371}">
                                #{monthItem.p6371}
                            </p:column>
                            <p:column headerText="6471" sortBy="#{monthItem.p6471}">
                                #{monthItem.p6471}
                            </p:column>
                            <p:column headerText="6571" sortBy="#{monthItem.p6571}">
                                #{monthItem.p6571}
                            </p:column>
                            <p:column headerText="6671" sortBy="#{monthItem.p6671}">
                                #{monthItem.p6671}
                            </p:column>
                            <p:column headerText="6771" sortBy="#{monthItem.p6771}">
                                #{monthItem.p6771}
                            </p:column>
                        </p:dataTable>
                    </h:form>

                </p:panel>


                <p:panel header="Theo ngày">
                    <h:form>
                        <h:panelGrid columns="5">
                            Ngày: <p:calendar value="#{productionByShortCodeBean.date}" pattern="dd/MM/yyyy" timeZone="Asia/Saigon" navigator="true"/> 
                            <p:commandButton ajax="false" value="Xem báo cáo" action="#{productionByShortCodeBean.reportByDay()}"/>
                            <p:commandButton ajax="false" value="Xem hôm nay" action="#{productionByShortCodeBean.reportByToday()}"/>
                        </h:panelGrid>
                    </h:form>
                    <br/>
                    <h:form>
                        <p:dataTable id="tblByDay" value="#{productionByShortCodeBean.productionDays}" var="monthItem">

                            <p:column headerText="Mạng" sortBy="#{monthItem.opertator}">
                                #{monthItem.opertator}
                            </p:column>
                            <p:column headerText="6071" sortBy="#{monthItem.p6071}">
                                #{monthItem.p6071}
                            </p:column>
                            <p:column headerText="6171" sortBy="#{monthItem.p6171}">
                                #{monthItem.p6171}
                            </p:column>
                            <p:column headerText="6271" sortBy="#{monthItem.p6271}">
                                #{monthItem.p6271}
                            </p:column>
                            <p:column headerText="6371" sortBy="#{monthItem.p6371}">
                                #{monthItem.p6371}
                            </p:column>
                            <p:column headerText="6471" sortBy="#{monthItem.p6471}">
                                #{monthItem.p6471}
                            </p:column>
                            <p:column headerText="6571" sortBy="#{monthItem.p6571}">
                                #{monthItem.p6571}
                            </p:column>
                            <p:column headerText="6671" sortBy="#{monthItem.p6671}">
                                #{monthItem.p6671}
                            </p:column>
                            <p:column headerText="6771" sortBy="#{monthItem.p6771}">
                                #{monthItem.p6771}
                            </p:column>
                        </p:dataTable>
                    </h:form>

                </p:panel>
            </ui:define>

        </ui:composition>

    </body>
</html>


